]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: fix part of the panel-corner-highlighting hack
authorDan Winship <danw@gnome.org>
Wed, 7 Sep 2011 16:23:43 +0000 (12:23 -0400)
committerDan Winship <danw@gnome.org>
Fri, 16 Sep 2011 18:15:48 +0000 (14:15 -0400)
The underline highlights on the panel menu items normally have a 100ms
transition between highlighted and unhighlighted, but the panel corner
graphics can't do that, so we hacked the Activities button and user
menu to have no transition. But in gdm mode, the user menu isn't the
rightmost item any more. Fix this by modifying the CSS from the code
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=651299

data/theme/gnome-shell.css
js/ui/panel.js

index 83a6d03179ab38c8468af10be2115aa2d7bcdded..8d3580e0ebb4e085a7fdfbd485b9d607dd567014 100644 (file)
@@ -371,18 +371,6 @@ StTooltip StLabel {
     -boxpointer-gap: 4px
 }
 
-/* The rounded panel corners we draw don't
- * support transitions, so disable transitions
- * for the buttons at the left/right edges
- */
-#panelActivities {
-    transition-duration: 0;
-}
-
-#panelStatus {
-    transition-duration: 0;
-}
-
 #panelStatusMenu {
     spacing: 4px;
 }
index b64a1b2242d4bd31e6f42da8560a7a72b2a8a3aa..57db1253215d7ccaa41890d38da74ac9a01bd95a 100644 (file)
@@ -782,8 +782,10 @@ PanelCorner.prototype = {
             button = this._findRightmostButton(this._box);
 
         if (button) {
-            if (this._button && this._buttonStyleChangedSignalId)
+            if (this._button && this._buttonStyleChangedSignalId) {
                 this._button.disconnect(this._buttonStyleChangedSignalId);
+                this._button.style = null;
+            }
 
             this._button = button;
 
@@ -801,6 +803,10 @@ PanelCorner.prototype = {
                     let pseudoClass = button.get_style_pseudo_class();
                     this.actor.set_style_pseudo_class(pseudoClass);
                 }));
+
+            // The corner doesn't support theme transitions, so override
+            // the .panel-button default
+            button.style = 'transition-duration: 0';
         }
     },